import React, { Component, PropTypes } from 'react';
import { connect } from 'dva';
import { Link } from 'dva/router';
import styles from './righttool.less';
import VtxRightTool from '../components/vtxRighttool';
import {Button} from 'antd';
function RightTool({dispatch,righttool}) {
	const {data} =righttool;
	function hover(item){
		/*console.log('item')
		console.log(item)
		console.log(isShow)*/
		dispatch({
			type:'righttool/fetch',
			payload:{
				data
			}
		})
	}
	function onClick(item,index){
		/*console.log('item')
		console.log(item)*/
		/*item.brandchShow=!item.brandchShow;*/
		dispatch({
			type:'righttool/fetch',
			payload:{
				data
			}
		})
	}
	function onSelect(checkedList,item,index){
		console.log(checkedList)
		console.log('item111')
		console.log(item)
	}
	const VtxRightToolProps={
		knock:true,
		/*hover,*/
		onClick,//一般和hover冲突
		onSelect,
		data,
		/*top:20,
		right:30*/
		
	}
  	return (
		    <VtxRightTool {...VtxRightToolProps}/>
  	);
}

RightTool.propTypes = {
};

export default connect(({righttool})=>({righttool}))(RightTool);
